This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
~Hal Nonamarli 15.Dec.03 02:48 PM a Web browser Domino Designer6.5Windows NT
We have an application that uses 4 Java Agents, we are evaluating R6.5 and are running into JVM memory issues.
These agents run fine with NO recycling of objects or garbage collection on and R5 server, they are used extensively and never fall over.
On R6.5 they will only run about 20 times before the JVM runs out of memory and cannot get the attachments (.jar files) stored in the ScriptLibrary.
I have put in recycling and garbage collection into the agents but this still happens (they run a bit longer). I am not a Java expert, but cannot see why they run under R5 and Notr R6.5 I feel 6.5 has a memory leak problem...
My code is below any help pointers very much appreciated, as this may stop our entire Notes 6.5 rollout in its tracks...
/**
*This method allows the Agent to send email, with varied errorMessage, serverName, and clientRef
*@param java.lang.String errorMessage - the error message to appear in the body of the email
*@param java.lang.String serverName - the name of the originating server
*@param java.lang.String clientRef - the client reference
*@param lotus.domino.Database theDatabase - the database used by the method to fomulate an email
*/
public void sendEmail(String errorMessage, Database theDatabase) {
//set the variables for use in the scope of this method from the method header
String theErrorMessage = errorMessage;
Database ourDatabase = theDatabase;
try{
//create document to be cast as an email
Document mail = ourDatabase.createDocument();
mail.appendItemValue("Form","Memo"); //type the document, make it a mail.
mail.appendItemValue("Subject", theErrorMessage); //set the error message from the method header.
Vector v = new Vector(); //create vector
v.addElement(emailGroup); //add address to vector
mail.send(v); //send mail to all address in the vector
}
//catch any Notes Exceptions which may occur
catch (NotesException argh) {
//unhandled exception
// if you are getting exceptions in this class, you are in trouble.
}
//catch any other Exceptions which may occur
catch(Exception argh) {
//still unhandled
}
}
/**
*This method mirrors the idea of a Java constructor inside the agent, allowing it to be called more than once in less lines of working code.
*/
public void createFixture() {
try{
session = getSession(); //set the session variable
agentContext = session.getAgentContext(); //set the context
db = agentContext.getCurrentDatabase(); //set the database
doc = agentContext.getDocumentContext(); //set the document
profileDoc = db.getProfileDocument("SystemProfile","");
emailGroup = profileDoc.getItemValueString(" EmailGroupErrors");
}
catch(NotesException urgh) {
String errorMessage = new String("Error - Client Inception Error - Failed General Exception \n\n\n " + urgh);
this.sendEmail(errorMessage, db);
}
catch(Exception urgh) {
String errorMessage = new String("Error - Client Inception Error - Failed General Exception \n\n\n " + urgh);
this.sendEmail(errorMessage, db);
}
}
/**
*This method separates the QAS Call feature into it's own method.
*/
public void QASCall() {
try {
PC = doc.getItemValueString("QAS_PostCode");
// Begin JHCTS QAS Calls
ValidateAddressBean vab = new ValidateAddressBean();
vab.setPostCode(PC);
vab.doTransaction();
if ( vab.getSucceeded() ) {
String postAddress = vab.getPostalAddress();
int itemListSize = vab.getAddressListSize();
// Process values using an array
Vector v = new Vector();
int count = 0;
while (count < itemListSize ) {
String addressItem = vab.getItemList(count);
v.addElement(addressItem);
count++;
}